﻿
@inject SignInManager<AppUser> SignInManager
@inject UserManager<AppUser> UserManager
@inject Microsoft.AspNetCore.Hosting.IHostingEnvironment env

@{
    var CurrentUser = await UserManager.GetUserAsync(User);
}


<form id="logoutForm" asp-controller="Account" asp-action="LogOff" asp-area=""
      method="post" role="form">
    @Html.AntiForgeryToken()
    <div class="nav-user">
        <div class="nav-user-info">
            <div class="nav-user-img"><img src="@Url.Action("Avatar", "Account", new { md5 =SS.Toolkit.Helpers.SecurityHelper.MD5(CurrentUser.UserName) })" /></div>
            <div class="nav-user-name text-ellipsis">@CurrentUser.DisplayName</div>
        </div>
        @this.BodyContent
        <ul class="nav-user-actions clearfix">
            <li title="注销"><a href="javascript:document.getElementById('logoutForm').submit()"><i class="fa fa-power-off"></i></a></li>
            <li title="更改密码"><a href="@Url.Action("ModifyPassword","Account",new { area =  ""})" target="_blank"><i class="fa fa-key"></i></a></li>
            <li title="档案"><a href="{{SiteVars.RelativeWebRoot}}admin/#/security/profile"><i class="fa fa-user"></i></a></li>
            <li title="查看首页"><a href="{{SiteVars.RelativeWebRoot}}" target="_blank"><i class="fa fa-globe"></i></a></li>
        </ul>
    </div>
</form>
<div class="nav-sidebar">
    <ul data-ng-controller="NavController">

        <li id="mu-dashboard" class="active"><a href="{{SiteVars.RelativeWebRoot}}admin/#/dashboard"><i class="fa fa-th-large"></i> 控制面板</a></li>
        <li id="mu-content">
            <a href="{{SiteVars.RelativeWebRoot}}admin/#/content/posts"><i class="fa fa-align-justify"></i> 内容</a>
            <ul class="sub-nav-sidebar">
                <li id="mu-posts" data-ng-class="{ active: isActive('/content/posts')}"><a href="{{SiteVars.RelativeWebRoot}}admin/#/content/posts">文章</a></li>

                <li id="mu-comments" data-ng-class="{ active: isActive('/content/comments')}"><a href="{{SiteVars.RelativeWebRoot}}admin/#/content/comments">评论</a></li>
                @*<li id="mu-pages" data-ng-class="{ active: isActive('/content/pages')}"><a href="{{SiteVars.RelativeWebRoot}}admin/#/content/pages">页面条目</a></li>*@
                <li data-ng-class="{ active: isActive('/content/categories')}"><a href="{{SiteVars.RelativeWebRoot}}admin/#/content/categories">管理分类</a></li>
                <li data-ng-class="{ active: isActive('/content/tags')}"><a href="{{SiteVars.RelativeWebRoot}}admin/#/content/tags">Tags</a></li>
                @*<li data-ng-class="{ active: isActive('/content/blogs')}"><a href="{{SiteVars.RelativeWebRoot}}admin/#/content/blogs">站点</a></li>*@
            </ul>
        </li>

        @*<li id="mu-custom">
            <a href="{{SiteVars.RelativeWebRoot}}admin/#/custom/themes"><i class="fa fa-sliders"></i> 自定义</a>
            <ul class="sub-nav-sidebar">
                <li data-ng-class="{ active: isActive('/custom/themes')}"><a class="ng-binding" href="{{SiteVars.RelativeWebRoot}}admin/#/custom/themes">主题模板</a></li>
                <li data-ng-class="{ active: isActive('/custom/plugins')}"><a class="ng-binding" href="{{SiteVars.RelativeWebRoot}}admin/#/custom/plugins">插件</a></li>
                <li data-ng-class="{ active: isActive('/custom/widgets')}"><a class="ng-binding" href="{{SiteVars.RelativeWebRoot}}admin/#/custom/widgets">小组件</a></li>
            </ul>
        </li>*@

        <li id="mu-users">
            <a href="{{SiteVars.RelativeWebRoot}}admin/#/security/profile"><i class="fa fa-user"></i> 用户</a>
            <ul class="sub-nav-sidebar">
                <li data-ng-class="{ active: isActive('/security/profile')}"><a class="ng-binding" href="{{SiteVars.RelativeWebRoot}}admin/#/security/profile">个人资料</a></li>

                <li data-ng-class="{ active: isActive('/security/roles')}"><a class="ng-binding" href="{{SiteVars.RelativeWebRoot}}admin/#/security/roles">角色</a></li>

                <li data-ng-class="{ active: isActive('/security/users')}"><a class="ng-binding" href="{{SiteVars.RelativeWebRoot}}admin/#/security/users">管理用户</a></li>
            </ul>
        </li>

        @*<li id="mu-settings">
            <a href="{{SiteVars.RelativeWebRoot}}admin/#/settings/basic"><i class="fa fa-cog"></i> 设置</a>
            <ul class="sub-nav-sidebar">
                <li data-ng-class="{ active: isActive('/settings/basic')}"><a class="ng-binding" href="{{SiteVars.RelativeWebRoot}}admin/#/settings/basic">基础</a></li>
                <li data-ng-class="{ active: isActive('/settings/email')}"><a class="ng-binding" href="{{SiteVars.RelativeWebRoot}}admin/#/settings/email">email</a></li>
                <li data-ng-class="{ active: isActive('/settings/feed')}"><a class="ng-binding" href="{{SiteVars.RelativeWebRoot}}admin/#/settings/feed">推送</a></li>
                <li data-ng-class="{ active: isActive('/settings/comments')}"><a class="ng-binding" href="{{SiteVars.RelativeWebRoot}}admin/#/settings/comments">评论</a></li>
                <li data-ng-class="{ active: isActive('/settings/controls')}"><a class="ng-binding" href="{{SiteVars.RelativeWebRoot}}admin/#/settings/controls">基本设置</a></li>
                <li data-ng-class="{ active: isActive('/settings/advanced')}"><a class="ng-binding" href="{{SiteVars.RelativeWebRoot}}admin/#/settings/advanced">高级设置</a></li>
            </ul>
        </li>*@
        <li id="mu-about"><a href="@Url.Action("About","Admin",new { area = "Admin" })"><i class="fa fa-info-circle"></i>about</a></li>
    </ul>
</div>
